#include "applycertificatefactory.h"
#include "applycertificatefunctionality.h"

#include <Modules/ModuleInterface.h>
#include <Modules/NetWorkInterface.h>
#include <Modules/TcpNetwork.h>
#include <Modules/applycertificateModule.h>

applyCertificateFactory::applyCertificateFactory()
    : FunctionalityFactory()
{}

std::shared_ptr<FunctionalityInterface> applyCertificateFactory::create()
{
    //首先需要创建TCP模块和申请证书模块
    std::shared_ptr<NetworkInterface> network = std::make_shared<TcpNetwork>();

    std::shared_ptr<ModuleInterface> module = std::make_shared<applyCertificateModule>();

    std::shared_ptr<FunctionalityInterface> function
        = std::make_shared<applyCertificateFunctionality>(network, module);
    return function;
}
